package org.example.order;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author tds
 * @version 1.0.0
 * @Company
 * @ClassName SpringbootOrderApplication
 * @Description
 * @Date 2023-04-12 20:36
 */
@SpringBootApplication
public class SpringbootOrderNacosConfigApplication {
    public static void main(String[] args) throws InterruptedException {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringbootOrderNacosConfigApplication.class, args);
        while (true) {
            System.out.println(applicationContext.getEnvironment().getProperty("common.username"));
            System.out.println(applicationContext.getEnvironment().getProperty("common.password"));
            Thread.sleep(3000);
        }
    }


}
